﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MShop.Core.Domain.OccasionProduct>>" %>

 
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="content" class="ovfl">
        <div id="left" class="side fl">
            <div class="s_box sb_1">
                <h2 class="colorFF0000">
                    一口价商品推荐</h2>
                <div class="sp_tj">
                    <%=Html.Action("RecommendProduct","Product") %>                     
                </div>
            </div>
            <div id="left" class="side fl">
                <div class="s_box sb_1">
                    <h2 class="colorFF0000">
                        热卖商品</h2>
                    <div class="sp_tj">
                        <%=Html.Action("TopProduct", "Product")%>          
                    </div>
                </div>
            </div>
        </div>
        <div id="right" class="main fr">
            <div class="xuan ovfl">
                <ul>
                    <li class="lei">场合分类:</li>
                    <li>
                       <% if (Request.Params["oid"] != null && -1 == Convert.ToInt32(Request.Params["oid"]))
                          { %>
                        <%=Html.ActionLink("不限", "Index", new { oid = -1 }, new { @class = "selected" })%>
                        <%}
                          else
                          { %>
                             <%=Html.ActionLink("不限", "Index", new { oid = -1 })%>
                        <%} %>
                        <% IEnumerable<Occasion> occassions = ViewData["oids"] as IEnumerable<Occasion>;
                           foreach (var item in occassions)
                           {
                        %>
                        <% if (Request.Params["oid"] != null && item.Id == Convert.ToInt32(Request.Params["oid"]))
                           { %>
                        <%=Html.ActionLink(item.OccasionName,"Index",new{oid=item.Id}, new { @class = "selected" }) %>
                        <%}else{ %>
                          <%=Html.ActionLink(item.OccasionName, "Index", new { oid = item.Id })%>
                        <%}} %>
                    </li>
                </ul>               
            </div>
            <div id="prdList" class="ct_2 border">
                <h2>
                    产品列表</h2>
                <div class="ovfl">
                    <% foreach (var item in Model)
                       { %>
                    <table>
                        <tr>
                            <td  >
                                <a href='/product/item/<%=item.ProductId %>'>
                                    <img src='<%=item.Product.ThumbImageUrl %>' /></a>
                            </td>
                            <td class="name">
                            
                                <a href='/product/item/<%=item.ProductId %>'>
                                    <%=item.ProductName %></a><br />
                                <del>市场价：￥<%=item.Product.Price%></del>
                                <i>商城价：￥<%=item.Product.ShopPrice%></i>
                                <p >合适场合：<%=item.Occasion.OccasionName %>
                                </p>
                            </td>
                        </tr>
                    </table>
                    <% } %>
                </div>
           
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMeta" runat="server">
</asp:Content>
